# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.VMMigration.V1.Model.AzureVmDetails do
  @moduledoc """
  AzureVmDetails describes a VM in Azure.

  ## Attributes

  *   `architecture` (*type:* `String.t`, *default:* `nil`) - The CPU architecture.
  *   `bootOption` (*type:* `String.t`, *default:* `nil`) - The VM Boot Option.
  *   `committedStorageMb` (*type:* `String.t`, *default:* `nil`) - The total size of the storage allocated to the VM in MB.
  *   `computerName` (*type:* `String.t`, *default:* `nil`) - The VM's ComputerName.
  *   `cpuCount` (*type:* `integer()`, *default:* `nil`) - The number of cpus the VM has.
  *   `diskCount` (*type:* `integer()`, *default:* `nil`) - The number of disks the VM has, including OS disk.
  *   `disks` (*type:* `list(GoogleApi.VMMigration.V1.Model.Disk.t)`, *default:* `nil`) - Description of the data disks.
  *   `memoryMb` (*type:* `integer()`, *default:* `nil`) - The memory size of the VM in MB.
  *   `osDescription` (*type:* `GoogleApi.VMMigration.V1.Model.OSDescription.t`, *default:* `nil`) - Description of the OS.
  *   `osDisk` (*type:* `GoogleApi.VMMigration.V1.Model.OSDisk.t`, *default:* `nil`) - Description of the OS disk.
  *   `powerState` (*type:* `String.t`, *default:* `nil`) - The power state of the VM at the moment list was taken.
  *   `tags` (*type:* `map()`, *default:* `nil`) - The tags of the VM.
  *   `vmId` (*type:* `String.t`, *default:* `nil`) - The VM full path in Azure.
  *   `vmSize` (*type:* `String.t`, *default:* `nil`) - VM size as configured in Azure. Determines the VM's hardware spec.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :architecture => String.t() | nil,
          :bootOption => String.t() | nil,
          :committedStorageMb => String.t() | nil,
          :computerName => String.t() | nil,
          :cpuCount => integer() | nil,
          :diskCount => integer() | nil,
          :disks => list(GoogleApi.VMMigration.V1.Model.Disk.t()) | nil,
          :memoryMb => integer() | nil,
          :osDescription => GoogleApi.VMMigration.V1.Model.OSDescription.t() | nil,
          :osDisk => GoogleApi.VMMigration.V1.Model.OSDisk.t() | nil,
          :powerState => String.t() | nil,
          :tags => map() | nil,
          :vmId => String.t() | nil,
          :vmSize => String.t() | nil
        }

  field(:architecture)
  field(:bootOption)
  field(:committedStorageMb)
  field(:computerName)
  field(:cpuCount)
  field(:diskCount)
  field(:disks, as: GoogleApi.VMMigration.V1.Model.Disk, type: :list)
  field(:memoryMb)
  field(:osDescription, as: GoogleApi.VMMigration.V1.Model.OSDescription)
  field(:osDisk, as: GoogleApi.VMMigration.V1.Model.OSDisk)
  field(:powerState)
  field(:tags, type: :map)
  field(:vmId)
  field(:vmSize)
end

defimpl Poison.Decoder, for: GoogleApi.VMMigration.V1.Model.AzureVmDetails do
  def decode(value, options) do
    GoogleApi.VMMigration.V1.Model.AzureVmDetails.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.VMMigration.V1.Model.AzureVmDetails do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
